#include "modbus_socket.h"


//获取ip 端口  获取客户端发来的数据
modbus_socket::modbus_socket(QObject *parent)
{

}

void modbus_socket::tcpSocketRead()
{
    //返回信号的发送者
    modbus_socket* tcpsocket = static_cast<modbus_socket*>(sender());
    //获取从机的IP和端口
    quint16 port = tcpsocket->peerPort();
    QString ip = tcpsocket->peerAddress().toString();

}
